package com.yosaa.back.utils;

import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.config.OutputFile;
import java.util.Collections;

public class CodeGenerator {


    public static void main(String[] args) {
        FastAutoGenerator.create("jdbc:mysql://localhost:3306/health_fitness_db", "root", "123456")
                .globalConfig(builder -> {
                    builder.author("yosaa")
                            .outputDir("C:\\Users\\youce_yosaa\\Desktop\\面包\\基于SpringBoot+kafka智慧体测记录算分系统的设计与实现\\back\\src\\main\\java") ;

                })
                .packageConfig(builder -> {
                    builder.parent("com.yosaa.back")
                            .moduleName(null)
                            .pathInfo(Collections.singletonMap(OutputFile.xml, "C:\\Users\\youce_yosaa\\Desktop\\面包\\基于SpringBoot+kafka智慧体测记录算分系统的设计与实现\\back\\src\\main\\resources\\mapper"));
                })
                .strategyConfig(builder -> {
                    builder.entityBuilder().enableLombok();
                    builder.mapperBuilder().enableMapperAnnotation().build();
                    builder.controllerBuilder().enableHyphenStyle()
                            .enableRestStyle();

                })

                .execute();

    }
}
